const consoleX: any = { ...console };
/**
 * 重写打印的方法，以便实现个性化需要
 * 日志打印方法
 * @param {*} type  console.xxx
 * @param  {...any} object 
 */
function consoleM(type: string = 'log', ...object: any) {
  try {
    const flg: boolean = import.meta.env.toString() != 'production'
    //  || (process.env.NODE_ENV != 'production' && process.env.npm_lifecycle_event != 'production')
    if (flg) {
      consoleX[type]('development==>', ...object)
    }
  } catch (e) {
  }
}
console.debug = function (...data: any) {
  consoleM('debug', ...data);
}

console.info = function (...data: any) {
  consoleM('info', ...data);
}

console.error = function (...data: any) {
  consoleM('error', ...data);
}

console.log = function (...data: any) {
  consoleM('log', ...data);
}

// export {...console };
